package org.zjt.spring.setfiled;


import java.lang.reflect.Proxy;

/**
 * Created by Administrator on 2017/4/12.
 */
public class JdkProxyFactory  {

    @SuppressWarnings("unchecked")
    public <T> T getProxy(MethodResult<T> invoker, Class<?>[] interfaces) {
        return (T) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), interfaces, new InvokerInvocationHandler(invoker));
    }

}
